import Http from '@/utils/api/request'


//post
export const uploadImg = (data) => {
    return Http.post("/xzl_index.php", data, {currentBaseUrl: 'fileUploadUrl'
    })
    // return axios({
    //     url: baseURL + "/xzl_index.php",
    //     method: "post",
    //     data,
    //     config: {
    //         requestBase:'VITE_FILEUPLOAD_BASE_URL',
    //         headers: {
    //             'Content-Type': 'blob'
    //         },
    //         timeout: 3000
    //     }
    // })
}
//获取聊天参数
export const queryChatInfo = (data) => {
    return Http.post("/customer_v1/chat_info", data)

    // return axios({
    //     url: baseURL2 + "/customer_v1/chat_info",
    //     method: "post",
    //     data,
    //     config: {
    //         requestBase:'VITE_CHAT_BASE_URL',
    //         timeout: 3000,
    //     }
    // })
}
// 获取聊天记录和用户列表
export const queryChatList = (data) => {
    return Http.post("/admin_v1/chat_list", data)

    // return axios({
    //     url: baseURL2 + "/admin_v1/chat_list",
    //     method: "post",
    //     data,
    //     config: {
    //         requestBase:'VITE_CHAT_BASE_URL',
    //         timeout: 3000,
    //     }
    // })
}
// 首页定制预约接口
export const reservation = (data) => {
    return Http.post("/customer_v1/appointment_add", data)

    // return axios({
    //     url: baseURL2 + "/customer_v1/appointment_add",
    //     method: "post",
    //     data,
    //     config: {
    //         requestBase:'VITE_CHAT_BASE_URL',
    //         timeout: 3000,
    //     }
    // })
}
// 短信验证码发送
export const code = (data) => {
    return Http.post("/customer_v1/mobile_code", data)

    // return axios({
    //     url: baseURL2 + "customer_v1/mobile_code",
    //     method: "post",
    //     data,
    //     config: {
    //         requestBase:'VITE_CHAT_BASE_URL',
    //         timeout: 3000,
    //     }
    // })
}
// 用户登录
export const login = (data) => {
    return Http.post("/customer_v1/login", data)

    // return axios({
    //     url: baseURL2 + "customer_v1/login",
    //     method: "post",
    //     data,
    //     config: {
    //         requestBase:'VITE_CHAT_BASE_URL',
    //         timeout: 3000,
    //     }
    // })
}

// 用户信息获取
export const getUsrInfo = () => {
    return Http.get("/customer_v1/user_info")
}
//  微信支付接口
export const postplay = (data) => {
    return Http.post("/customer_v1/balance_payment",data)
}
//  检查是否支付接口
export const payOrnot = (data) => {
    return Http.post("/customer_v1/wechat_pay_state",data)
}
// 修改密码接口
export const ChangePassword = (data) => {
    return Http.post("/customer_v1/update_password",data)
}
// 修改个人信息
export const changeinformation = (data) => {
    return Http.post("/customer_v1/user_update",data)
}
// 交易记录
export const queryOrderList = (data) => {
    return Http.get("/customer_v1/order_list",data)
}
// 需求列表接口
export const queryDemandList = (data) => {
    return Http.get("/customer_v1/demand_list",data)
}
// 任务列表接口
export const queryTaskList = (data) => {
    return Http.get("/customer_v1/keyword_list",data)
}
// 任务详情关键词列表记录接口
export const keyWordsList = (data) => {
    return Http.get("/customer_v1/keyword_record",data)
}
// 判断余额是否足够创建任务(预检)
export const checkBalance = (data) => {
    return Http.post("/customer_v1/keyword_add_in",data)
}
// 新增任务接口
export const addTask = (data) => {
    return Http.post("/customer_v1/keyword_add",data)
}
// 补充关键词/确认稿件等
export const updateTask = (data) => {
    return Http.post("/customer_v1/keyword_update",data)
}
//资金流水查询
export const records = (data) => {
    return Http.get("/customer_v1/records",data)
}
